// run: $exec < input
#include <iostream>
#include <vector>
#include <algorithm>

struct people
{
	int vote;
	int index;
};

bool operator<(people const & a, people const & b)
{
	return a.vote > b.vote || (a.vote == b.vote && a.index < b.index);
}

int const maxn = 107;
bool first_state[maxn];

int n, m;

int main()
{
	std::cin >> n >> m;
	std::vector<people> p;
	std::vector<people> city(n);
	for (int i = 1; i <= n; i++) city[i-1].index = i;
	for (int i = 0; i < m; i++) {
		p.clear(); p.resize(n);
		for (int i = 1; i <= n; i++) p[i-1].index = i;
		for (int j = 0, x; j < n; j++) {
			std::cin >> x;
			p[j].vote += x;
		}
		std::sort(p.begin(), p.end());
		city[p[0].index - 1].vote++;
	}
	std::sort(city.begin(), city.end());
	std::cout << city[0].index << '\n';
}

